#include <gflags/gflags.h>
#include <iostream>

DEFINE_string(ip, "127.0.0.1", "这是服务器监听的IP地址,格式:127.0.0.1");
DEFINE_int32(port, 8080, "这是服务器监听的端口号,范围:1024~65535");
DEFINE_bool(reuse_addr, true, "是否启动端口重用");

int main(int argc, char *argv[])
{
    gflags::ParseCommandLineFlags(&argc, &argv, true);

    std::cout << "ip: " << FLAGS_ip << std::endl;
    std::cout << "port: " << FLAGS_port << std::endl;
    std::cout << "reuse_addr: " << FLAGS_reuse_addr << std::endl;

    return 0;
}